// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理NewReps
import user from '@/views/system/user';
// 显示新工单
import NewReps from '@/views/zongguan/NewReps';
// 员工管理
import AddUser from '@/views/useremp/AddUser';
// Echart图表
import UserDept from '@/views/useremp/UserDept';
// 权限分配全员工
import UserRole from '@/views/useremp/UserRole';
// 权限分配
import role from '@/views/useremp/role';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';
// 工单总管分配工单
import Wait from '@/views/zongguan/Wait';
// 工单总管查看进度
import RepProgress from '@/views/zongguan/RepProgress';
// 工单总管查看所有已分配工单
import RepDistribution from '@/views/zongguan/RepDistribution';
// 工单总管提交工单
import CommitRep from '@/views/zongguan/CommitRep';
// 工单总管查看反馈工单~~~~~~
import RepFeedback from '@/views/zongguan/RepFeedback';
// 图表界面
import statistics from '@/views/charts/statistics';
import aaa from '@/components/aaa'
//查看设备清单
import Information from '@/views/mac/Information';
//申请设备
import ApplyMac from '@/views/mac/ApplyMac';
import SelChuRu from  '@/views/mac/SelChuRu';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    },{
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/Goods',
            name: '商品管理',
            component: Goods,
            meta: {
                requireAuth: true
            }
        },  {
            path: '/zongguan/Wait',
            name: 'Wait',
            component: Wait,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },  {
            path: '/zongguan/CommitRep',
            name: 'CommitRep',
            component: CommitRep,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },  {
            path: '/zongguan/RepProgress',
            name: 'RepProgress',
            component: RepProgress,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },  {
            path: '/zongguan/RepFeedback',
            name: 'RepFeedback',
            component: RepFeedback,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },{
            path: '/machine/Machine',
            name: '机器信息管理',
            component: Machine,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/MachineAisle',
            name: '货道信息管理',
            component: MachineAisle,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/Order',
            name: '交易订单',
            component: Order,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/zongguan/RepDistribution',
            name: '查看已分配工单',
            component: RepDistribution,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/zongguan/NewReps',
            name: '显示新工单',
            component: NewReps,
            meta: {
                requireAuth: true
            }
        },{
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/useremp/AddUser',
            name: '员工管理',
            component: AddUser,
            meta: {
                requireAuth: true
            }
        },  {
            path: '/useremp/UserRole',
            name: '员工权限管理',
            component: UserRole,
            meta: {
                requireAuth: true
            }
        },{
            path: '/useremp/UserDept',
            name: '图表统计',
            component: UserDept,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/useremp/role',
            name: '权限分配',
            component: role,
            meta: {
                requireAuth: true
            }
        },{
            path: '/system/Module',
            name: '菜单管理',
            component: Module,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Role',
            name: '角色管理',
            component: Role,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Dept',
            name: '公司管理',
            component: Dept,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Variable',
            name: '系统环境变量',
            component: Variable,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Permission',
            name: '权限管理',
            component: Permission,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/mac/ApplyMac',
            name: '申请设备',
            component: ApplyMac,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/mac/SelChuRu',
            name: '查看出入库信息',
            component: SelChuRu,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/mac/Information',
            name: '查看设备清单',
            component: Information,
            meta: {
                requireAuth: true
            }
        },
           
        {
          path: '/ApplyMac',
          name: 'ApplyMac',
          component: ApplyMac
        }
    ]
    }]
})